package cn.hx.mallBlog.controller;

import cn.hx.mallBlog.entity.CmsTopicCategory;
import cn.hx.mallBlog.service.CmsTopicCategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 话题分类表(CmsTopicCategory)表控制层
 *
 * @author makejava
 * @since 2022-11-30 15:36:12
 */
@RestController
@RequestMapping("cmsTopicCategory")
public class CmsTopicCategoryController {
    /**
     * 服务对象
     */
    @Resource
    private CmsTopicCategoryService cmsTopicCategoryService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public CmsTopicCategory selectOne(Long id) {

        return this.cmsTopicCategoryService.queryById(id);
    }

}